import { defineStore } from 'pinia'

export const useIndex = defineStore('index', {
  state: () => ({
    SideLeftMeShow: false,
    active: 0,
  }),
  actions: {
    changeActive(val) {
      this.active = val;
    },
    changeSideLeftMeShow(val) {
      this.SideLeftMeShow = val;
      const app = document.querySelector("#app")
      if (val) {
        app.classList.add("showLeft")
      } else {
        app.classList.remove("showLeft")
      }
    }
  },
  getters: {

  }
})